Skip to content

fix(om2.0) : do we really need escaping for escaping?#2900

Open
krajorama wants to merge 1 commit intomainfrom
krajo/om2-quoted-char
Open

fix(om2.0) : do we really need escaping for escaping?#2900
krajorama wants to merge 1 commit intomainfrom
krajo/om2-quoted-char

Conversation

@krajorama
Copy link
Member

@krajorama krajorama commented Mar 18, 2026

In my VS Code preview and in github
https://github.com/prometheus/docs/blob/main/docs/specs/om/open_metrics_spec_2_0.md#escaping
the text reads just fine without it.

Switch to also "View" of the changed file when reviwing this PR.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
@krajorama krajorama requested review from bwplotka, dashpole and ywwg March 18, 2026 09:50
@krajorama krajorama added the priority/p2 Candidates for next primary. label Mar 18, 2026
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for extra escaping, just I don't understand that sentence properly.

#### Escaping

Where the ABNF notes escaping, the following escaping MUST be applied Line feed, `\n` (0x0A) -> literally `\\n` (Bytecode 0x5c 0x6e) Double quotes -> `\\"` (Bytecode 0x5c 0x22) Backslash -> `\\\\` (Bytecode 0x5c 0x5c)
Where the ABNF notes escaping, the following escaping MUST be applied Line feed, `\n` (0x0A) -> literally `\n` (Bytecode 0x5c 0x6e) Double quotes -> `\"` (Bytecode 0x5c 0x22) Backslash -> `\\` (Bytecode 0x5c 0x5c)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Must be applied Line feed" - this reads weird. Is this a valid English?

Also "Where the ABNF notes escaping," - does it mens "when the ABNF defines the use of escaping"? Can we reword?

What about:

Suggested change
Where the ABNF notes escaping, the following escaping MUST be applied Line feed, `\n` (0x0A) -> literally `\n` (Bytecode 0x5c 0x6e) Double quotes -> `\"` (Bytecode 0x5c 0x22) Backslash -> `\\` (Bytecode 0x5c 0x5c)
Where the ABNF notes escaping, the following escaping MUST be applied:
* Line feed, `\n` (0x0A) -> literally `\n` (Bytecode 0x5c 0x6e)
* Double quotes -> `\"` (Bytecode 0x5c 0x22)
* Backslash -> `\\` (Bytecode 0x5c 0x5c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p2 Candidates for next primary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants